#include "HPDataSafety.h"


void HPDataSafety::EncryptData(char* DataToEncrypt,int DataLength)
{
	char* key ="hello";
	for(int i=0;i<DataLength;i++)
	{
		if ((DataToEncrypt[i]^key[i%5])=='\0')continue;
		DataToEncrypt[i]=DataToEncrypt[i]^key[i%5];
	}
}

void HPDataSafety::DecryptData(char* DataToDecrypt,int DataLength)
{
	char* key ="hello";
	for(int i=0;i<DataLength;i++)
	{
		if ((DataToDecrypt[i]^key[i%5])=='\0')continue;
		DataToDecrypt[i]=DataToDecrypt[i]^key[i%5];
	}
}
